package com.shiminghui.test2;

public class GameTest {
    public static void main(String[] args) {

        Role role = new Role("乔峰",100,'男');
        Role role1 = new Role("鸠摩智",100,'男');
        System.out.println(role.toString());
        System.out.println(role1.toString());
        while (true){
            role.attack(role1);
            if (role1.getBlood()==0){
                System.out.println(role.getName()+"ko"+role1.getName());
                return;
            }
            role1.attack(role);
            if (role.getBlood()==0){
                System.out.println(role1.getName()+"ko"+role.getName());
                return;
            }
        }
    }
}
